﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1.UserControls
{
    public partial class Greeting : System.Web.UI.UserControl
    {
        private string _fullName;

        public string FullName
        {
            get { return _fullName = txtName.Text; }
            //set 
            //{ 
            //    _fullName = value;
            //    txtName.Text = value;
            //}
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            lblGreeting.Text = string.Empty;
        }

        protected void btnGo_Click(object sender, EventArgs e)
        {
            lblGreeting.Text = "Hello, " + txtName.Text;
        }
    }
}